set(target_name render_test)

set(CMAKE_CXX_STANDARD 17)

file(GLOB_RECURSE SOURCES ./*.cpp )

add_executable(${target_name} ${SOURCES})

target_include_directories(
    ${target_name} PRIVATE
    ../../src/ecs
    ../../src/render
    ../../src/input
    ../../src/axis
    ../../src/drawing
)
target_link_libraries(${target_name} PRIVATE qbe)

include_directories(
    # qlayout sdk
    ${QLAYOUT_SDK}/plugins/gtest_x64-windows/include
    ${QLAYOUT_SDK}/plugins/entt_x64-windows/include
    ${QLAYOUT_SDK}/plugins/spdlog_x64-windows/include
    ${QLAYOUT_SDK}/plugins/fmt_x64-windows/include
    ${QLAYOUT_SDK}/plugins/vsgQt/include
    ${QLAYOUT_SDK}/plugins/vsg/include

    # vulkan sdk
    $ENV{VULKAN_SDK}/Include
    $ENV{QT5_SDK}/include
)

# ##--> Qt5 link libs
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Concurrent)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Concurrent)
target_link_libraries(${target_name} PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Concurrent)

# link sdk libraries 
file(GLOB_RECURSE QLAYOUT_SDK_LIB_FILES ${QLAYOUT_SDK}/lib/*.lib)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    file(GLOB_RECURSE QLAYOUT_SDK_LIB_FILES ${QLAYOUT_SDK}/debug/lib/*.lib)
endif()
target_link_libraries(${target_name} PRIVATE ${QLAYOUT_SDK_LIB_FILES})



